package com.hrbxlh.actionImpl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.hrbxlh.dao.MemberDao;
import com.hrbxlh.dao.RelStuClassDao;

@Component("relStuClassActionImpl")
@Transactional
public class RelStuClassActionImpl {
	
	@Resource(name = "relStuClassDao")
	private RelStuClassDao relStuClassDao;
	

	/**
	 * @description 添加学生与班级关联的方法，参数key与数据库column对应即可。 
	 * @param Map<String,Object> paramMap
	 * @return Map<String, String> result true成功，false失败 errorMsg错误信息
	 * @throws Exception
	 */
	public Map<String, String> addRelStuClass(Map<String, Object> paramMap) throws Exception {

		Map<String, String> resultMap = new HashMap<String, String>();
		boolean result = false;
		String failMsg = "";
		try {
			
			//添加
			result = relStuClassDao.addRelStuClass(paramMap);
			
			if(!result){
				failMsg = "fail";
				resultMap.put("errorMsg", failMsg);
			}
			
			resultMap.put("result", String.valueOf(result));
			
		} catch (Exception e) {
			throw e;
		}
		return resultMap;
	}

}
